import Cookie from 'js-cookie'

const key = 'Authorization'


var millisecond = new Date().getTime();
var expiresTime = new Date(millisecond + 60 * 1000 * 60);

//设置登录态
export function setCookie(value: string) {
    Cookie.set(key, value, { expires: expiresTime })
}

// 清除登陆态
export function removeCookie() {
    Cookie.remove(key);
}

// 获取登陆态
export function getCookie() {
    // console.log(Cookie.get(key))
    return Cookie.get(key);
}
